package br.com.panfleto.cadastro.model.persistence;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** @author Hibernate CodeGenerator */
public class TbMercadoFormaPgtoPK implements Serializable {

	/** identifier field */
	private Integer mercadoCod;

	/** identifier field */
	private Integer formaPgtoCod;

	/** full constructor */
	public TbMercadoFormaPgtoPK(Integer mercadoCod, Integer formaPgtoCod) {
		this.mercadoCod = mercadoCod;
		this.formaPgtoCod = formaPgtoCod;
	}

	/** default constructor */
	public TbMercadoFormaPgtoPK() {
	}

	public Integer getMercadoCod() {
		return this.mercadoCod;
	}

	public void setMercadoCod(Integer mercadoCod) {
		this.mercadoCod = mercadoCod;
	}

	public Integer getFormaPgtoCod() {
		return this.formaPgtoCod;
	}

	public void setFormaPgtoCod(Integer formaPgtoCod) {
		this.formaPgtoCod = formaPgtoCod;
	}

	public String toString() {
		return new ToStringBuilder(this).append("mercadoCod", getMercadoCod())
				.append("formaPgtoCod", getFormaPgtoCod()).toString();
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if (!(other instanceof TbMercadoFormaPgtoPK))
			return false;
		TbMercadoFormaPgtoPK castOther = (TbMercadoFormaPgtoPK) other;
		return new EqualsBuilder().append(this.getMercadoCod(),
				castOther.getMercadoCod()).append(this.getFormaPgtoCod(),
				castOther.getFormaPgtoCod()).isEquals();
	}

	public int hashCode() {
		return new HashCodeBuilder().append(getMercadoCod()).append(
				getFormaPgtoCod()).toHashCode();
	}

}
